# -*- coding: utf-8 -*-#

# -------------------------------------------------------------------------------
# Name:         init_51job_page_list_link
# Description:  初始化列表页所有url
# Author:       zhuchunxu
# Date:         2020/11/3
# -------------------------------------------------------------------------------

import redis

from spider_source.utils.redis_utils import RedisUtils


def init_page_list_link():

    utils = RedisUtils()
    # 构造连接

    for i in range(1,3):
        url ="http://www.pxrc.com.cn/job?pagesize=30&order=2&page="+str(i)+"#rs"
        print("插入：", url)
        utils.conn.lpush("pzhrcJob:page_list_link", url)

if __name__ == "__main__":
    print("开始初始化。。。")
    init_page_list_link()
    print("执行完毕")
